SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vweDocumentosPendientes
AS
SELECT     IdDocumentacionMovimientos AS ID,
		   IdDocumentacion, FechaEntrada,
		   Origen,
		   FechaSalida,
		   Destino,
		   Observaciones,
		   FechaReingreso
FROM       dbo.tb_DocumentacionMovimientos
WHERE     (FechaSalida IS NULL)
GO
GRANT SELECT ON  [dbo].[vweDocumentosPendientes] TO [GestionDespacho]
GRANT INSERT ON  [dbo].[vweDocumentosPendientes] TO [GestionDespacho]
GRANT DELETE ON  [dbo].[vweDocumentosPendientes] TO [GestionDespacho]
GRANT UPDATE ON  [dbo].[vweDocumentosPendientes] TO [GestionDespacho]
GRANT SELECT ON  [dbo].[vweDocumentosPendientes] TO [Informatica]
GRANT INSERT ON  [dbo].[vweDocumentosPendientes] TO [Informatica]
GRANT DELETE ON  [dbo].[vweDocumentosPendientes] TO [Informatica]
GRANT UPDATE ON  [dbo].[vweDocumentosPendientes] TO [Informatica]
GRANT SELECT ON  [dbo].[vweDocumentosPendientes] TO [SoloVer]
GO
